//this is js document

var scrollData = {
	url:null,
	callBack:null,
	index:0,
	size:20,
	init:function(index,size,url,callBack){
		var self = this;
		self.url = url;
		self.callBack = callBack;
		self.index = index;
		self.size = size;
		//window.parent.window.onscroll = self.bindScroll;
	},
	load:function(){
		var self = this;
		
		//登录页面后通过myajax获取进一步的信息
		var myajax = getByAjax();
		var url = self.url +"?index="+(++self.index*self.size)+"&size="+self.size;
		myajax.init(null,"get",true);
		myajax.get(url,function(d){
//			var data = eval("("+d+")");
			var data = toJson(d);
			self.callBack(data);
			//window.parent.window.onscroll = self.bindScroll;
		});
		myajax = null;
	},
	bindScroll:function(event){
		var self = this;
		event = event || window.event;
		var target = event.target || event.srcElement;
		var body = target.body;
		/*if(body.scrollTop>body.scrollTopMax-100){
			window.parent.window.onscroll = null;
			self.load();
		}*/
	}
}